//
// Created by 11510 on 2024/6/20.
//
#include <iostream>
#include <string>
using namespace std;

template<class T1, class T2>
T1 add(T1 t1, T2 t2) {
    printf("template1\n");
    return t1 + t2;
}
template<class T1, class T2>
T1 add(T2 t2, T1 t1) {
    printf("template2\n");
    return t1 + t2;
}

void test0() {
    int a = 4;
    double b = 1.2;
//    WARN!!!
//    查汇编！！！
    cout << add<int>(a, b) << endl;
    cout << add<double>(a, b) << endl;
}

int main() {
    test0();
    return 0;
}
